package com.ml.utils.asset;

import com.google.common.collect.Lists;
import com.ml.utils.test.entity.Parent;

import java.util.List;

/**
 * @author zhaozongyi@mmears.com
 * @date 2021-06-03
 * @time 14:42
 */
public class EntityChildren<T extends Parent> {

    public List<T> entityHandler(T entity, Class<T> clazz) throws IllegalAccessException, InstantiationException {
        T a = clazz.newInstance();
        System.out.println(entity.getId());
        System.out.println(entity.getFid());
        System.out.println(entity.getById());
        System.out.println("===============");
        System.out.println(a.getId());
        System.out.println(a.getFid());
        System.out.println(a.getById());
        List<T> list = Lists.newArrayList();
        list.add(a);
        return list;
    }
}
